<div class="row" style="margin-top: -1px;">
	<div class="col-md-12">
		<table class="table table-bordered" style="border: none;">
			<tr>
				<#if roles.canPlanWork && roles.contractMain>
				<th class="text-center" width="45">变更</th>
				</#if>
				<th class="text-center" width="60">序号</th>
				<th class="text-center">工作内容</th>
				<th class="text-center" width="80">里程碑</th>
				<th class="text-center" width="110">开始时间</th>
				<th class="text-center" width="110">结束时间</th>
				<th class="text-center" width="60">责任人</th>
				<th class="text-center" width="75">计划变更</th>
				<th class="text-center" width="75">执行情况</th>
				<th class="text-center">备注</th>
				<th class="text-center" style="min-width: 160px;">变更记录</th>
			</tr>
			<#if data.workPlans??>
			<#list data.workPlans as wp>
			<tr class="${(wp.completed?? && wp.completed)?string('money-gave-back',((wp.overDate)?string('text-danger','')))}">
				<#if roles.canPlanWork && roles.contractMain>
				<td class="text-center" title="变更">
					<#if wp.isThisCreator(Session['login_user'].id) && (!wp.completed?? || !wp.completed)>
					<a href="javascript:;" class="icon-random text-primary edit-work-plan" data-id="${wp.id}" title="变更"></a>
					</#if>
				</td>
				</#if>
				<td class="text-center">${wp_index+1}</td>
				<td class="text-center">${wp.work!'-'}</td>
				<td class="text-center">${wp.milestone.value!'-'}</td>
				<td class="text-center">${(wp.startDatePoint?string('yyyy-MM-dd'))!'-'}</td>
				<td class="text-center">${(wp.datePoint?string('yyyy-MM-dd'))!'-'}</td>
				<td class="text-center">${(wp.header)!'-'}</td>
				<td class="text-center">${(wp.changed?string('已变更','未变更'))!'-'}</td>
				<td class="text-center">${(wp.completed?string('已执行','未执行'))!'-'}</td>
				<td>
					${(wp.remark?replace('\n','
					<br>
					'))!'-'}
				</td>
				<td>
					<!--  -->
					<#if wp.changeReason??>
					<#list wp.changeReason?split('++--++') as r>
					<#assign d=r?split('--++--')>
					<small class="text-danger"> ${r_index+1}、${d[0]!''} （${d[1]!''}） </small>
					<small>
						<br>
						${(d[2]?replace('\n','
						<br>
						'))!''}
					</small>
					<br>
					</#list>
					<#else>
					-
					</#if>
				</td>
			</tr>
			</#list>
			</#if>
		</table>
	</div>
</div>

